import time
import datetime

class MyTime:
    
    @staticmethod
    def current_sec():
        t = time.time()
        return int(round(t))

    @staticmethod
    def current_mill_sec():
        t = time.time()
        return int(round(t * 1000))

    @staticmethod
    def forward_relative_date(diff):
        date_new = datetime.datetime.now() - datetime.timedelta(days = diff)
        return str(date_new)[0:10]

    @staticmethod
    def forward_relative_date_by_hour(diff):
        date_new = datetime.datetime.now() - datetime.timedelta(hours = diff)
        return str(date_new)[0:10]

